<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <div>
        <h3 key="****">hello jack</h3>
      </div>
    </div>
    <script src="./vue.js"></script>
    <script>
      // 真实DOM
      // <h3>hello jack</h3>

      // 虚拟DOM
      h3 = { name: "h3", key: "a", content: "hello jack" };

      // 虚拟DOM=>Vue render=>真实DOM=>挂载到#app

      new Vue({
        el: "#app",
        data: {
          flag: true,
        },
        methods: {
          set() {
            this.flag = false;
          },
        },
      });
    </script>
  </body>
</html>
